#! /bin/sh

# 防火墙先干掉(仅限自己测试)
systemctl status firewalld.service
systemctl stop firewalld.service
systemctl disable firewalld.service

# docker安装
sudo yum -y update
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
# 试试这个
sudo yum install -y docker-ce docker-ce-cli containerd.io
# -y 代表自动确认安装哪些东西
docker -v

# 启动docker引擎
systemctl start docker
systemctl status docker
systemctl enable docker

echo '{
  "registry-mirrors": ["https://45umvrah.mirror.aliyuncs.com"],
  "insecure-registries": ["192.168.108.14:85","192.168.80.159:85"]
}' > /etc/docker/daemon.json

systemctl restart docker
